import {
  COMPANYINFO,
  COMPANYBASE,
  SYSTRMINFO,
  HEADERHEIGTHT,HEADERTITLE
} from "../constants/company";

const INITIAL_STATE = {
  __companyInfo: null,
  __companyBase: null,
  __systemInfo: null,
  __headerHeight: null,
  __headerTitle: null,
};

export default function company(state = INITIAL_STATE, action) {
  switch (action.type) {
    case COMPANYINFO:
      return {
        ...state,
        __companyInfo: action.payload,
      };
    case COMPANYBASE:
      return {
        ...state,
        __companyBase: action.payload,
      };
    case SYSTRMINFO:
      return {
        ...state,
        __systemInfo: action.payload,
      };
    case HEADERHEIGTHT:
      return {
        ...state,
        __headerHeight: action.payload,
      };
    case HEADERTITLE:
      return {
        ...state,
        __headerTitle: action.payload,
      };
    default:
      return state;
  }
}
